The field of the invention is the control of building systems, and more particularly, the control of heating, ventilating and air conditioning (HVAC) systems.
In the parent application cited above, a controller implements both continuous and discrete control for a heating, ventilating and air conditioning (HVAC) system for a building. The system has sensors for sensing the environmental conditions, such as air flow and temperature, and has system elements such as air flow dampers and heaters, for changing the environmental conditions. The apparatus includes a state machine controller which transitions from one defined output state to another defined output state upon sensing the state of one of more inputs according to state machine logic.
Prior HVAC controllers of the present assignee have utilized an object-oriented networked operating system, known as Metasys with NOAH objects, which has been described in U.S. patent application No. 09/054,690, filed Apr. 3, 1998, which is entitled xe2x80x9cApplication-Centric Building Automation Software Componentsxe2x80x9d and which is assigned to the assignee of the present invention.
The present invention provides a method and apparatus for programming and executing the state machine control program described in the controller of the prior application. The present invention not only provides for programming and downloading of such a program, but also provides data structures for downloading into an object-oriented data structure in the controller for execution by an object-oriented execution routine in the controller.
The programming system utilizes graphical programming displays, which are easy to observe and use in entering state machine logic programs. In a preferred embodiment, the programming software is provided by a commercially available general purpose program such as Microsoft Excel for Windows(copyright), Version 7.0. Other types of spreadsheet software, or other types of programming interfaces could also be used. In the preferred embodiment, a state machine diagram of a type familiar to those of ordinary skill in the art is converted to tabular data which is entered into several spreadsheet pages. The tabular data includes the defined output states, the defined input states and defined transition states, whereby a given output state and a given set of inputs will cause transition to a next output state.
The tabular data is translated, through generation of routine in the Excel macro programming language, into a data structure including a plurality of tables. This data structure is loaded into one or more files for downloading. The files are then downloaded and the data is loaded into a finite state machine object data structure in the controller, where it will be acted upon by an object-oriented execution module, referred to as a class execute method, which is also present in the controller. Thus, there is an execution routine and a state machine object data structure in the controller.
Still further, the invention provides for programming a state logic program for multi-level state diagrams which include superstates and one or more levels of substates.
Other objects and advantages, besides those discussed above, will be apparent to those of ordinary skill in the art from the description of the preferred embodiment which follows. In the description, reference is made to the accompanying drawings, which form a part hereof, and which illustrate examples of the invention. Such examples, however, are not exhaustive of the various embodiments of the invention and, therefore, reference is made to the following claims which follow the description for determining the scope of the invention.